How Ladder Logic Program Scan Works